<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>AngularJs复杂操作</title>
		<script type="text/javascript" src="../js/angular.min.js" ></script>
	</head>
	<!--ng-app 程序的入口  作用域-->
	<body >
		<div ng-app="myapp" ng-controller="myctrl">
			<div>
				<!--将输入框与ng绑定-->
				<input type="text" name="name" ng-model="cc">
				<input type="button" value="清空" ng-click="cc=''">
			</div>
			
			<div>
				<!--数据的显示-->
				hello ,{{cc}}
			</div>
				<div>
					
					<!--数据的显示-->
					hello,<span ng-bind="cc" ></span>
				</div>
		</div>
		
		<script>
			var myapp =angular.module("myapp",[]);
			
			myapp.controller("myctrl",function($scope){
				$scope.cc="黑马程序员";	
				/*$scope.clearVal=function(){
					$scope.cc="";
				}*/
			})
			
			
		</script>
		
		
	</body>
</html>
